import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView/HomeView.vue'
import MvView from '../views/VideoView/VideoView.vue'
import UserView from '../views/UserView/UserView.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },

    {
      path: '/mv',
      name: 'mv',
      component: MvView,
      children: [
        {
          path: 'mvDetails/?id',
          name: 'mvDetails',
          component: () => import('../views/VideoView/VideoDetailsView.vue'),
        }
      ]
    },
    {
      path: '/mine',
      name: 'mine',
      component: UserView
    },
    {
      path: '/playControl',
      name: 'playControl',
      component: () => import('../components/PlayControl.vue')
    },
    {
      path: '/songDetails',
      name: 'songDetails',
      component: () => import('../components/SongDetails.vue'),
    }, {
      path: '/searchDetails',
      name: 'searchDetails',
      component: () => import('../components/SearchModule.vue'),
    },
   

  ]
})

export default router
